/**
 * 
 */
package instructions;

import dataCPU.*;

/**
 * @author dt08nu0
 *
 */
public abstract class Operation implements Instruction {

	private Data data, data2;
	private Address address;
	
	public Operation(Data data, Data data2, Address address) {
		
		this.address = address;
		this.data = data;
		this.data2 = data2;
		
	}

    public Word execute(Memory memory, Integer programCounter){
		return operand(data.getObj(),data2.getObj());
	}
	protected abstract Word operand(Word num1, Word num2);
		
	

}
